package com.ssy.lingxi.product.api.model.request;

import com.ssy.lingxi.product.api.model.request.commodity.CommodityAttributeRequest;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 货品(物料)实体类
 *
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/30
 */
@Data
public class GoodsRequest {

    /**
     * 主键id
     */
    private Long id;

    /**
     * 货号
     */
    @NotEmpty(message = "物料编号不能为空")
    private String code;

    /**
     * 货品名称
     */
    @NotEmpty(message = "物料名称不能为空")
    private String name;

    /**
     * 规格型号
     */
    private String type;

    /**
     * 品类id
     */
    @NotNull(message = "品类不能为空")
    private SimpleIdRequest customerCategory;

    /**
     * 品牌id
     */
    private SimpleIdRequest brand;

    /**
     * 物料组id
     */
    private SimpleIdRequest materialGroup;

    /**
     * 单位id
     */
    @NotNull(message = "单位不能为空")
    private Long unitId;

    /**
     * 成本价
     */
    @NotNull(message = "目录价不能为空")
    private Double costPrice;

    /**
     * 物料属性
     */
    private List<CommodityAttributeRequest> commodityAttributeList;

    /**
     * 物料图片
     */
    private String[] goodsPic = new String[]{};

    /**
     * 附件信息
     */
    private List<EnclosureUrlsRequest> urls = new ArrayList<>();

    /**
     * 货源清单
     */
    private GoodsSupplyListRequest goodsSupplyListRequest;

    /**
     * 备注
     */
    private String remark;

    /**
     * 是否变更 (变更操作时生效)
     */
    private Boolean change = false;

    /**
     * 变更备注 (变更操作时生效)
     */
    private String changeRemark;


}
